home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / rayview / makefile.sh < prev    next >
Makefile  |  1994-08-09  |  3KB  |  133 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. #
  24. # Makefile for rayview 
  25. #
  26. # Craig Kolb
  27. #
  28. # \Makefile.SH,v 4.1 1994/08/09 08:07:52 explorer Exp
  29. #
  30. # Bin directory
  31. #
  32. BINDIR = $bin 
  33. #
  34. # If you are using LINDA, add -DLINDA
  35. # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  36. # Be sure to add any necessary floating point hardware switches.
  37. OPTIMIZE = $optimize
  38. URTINC = $urtinc
  39. CCFLAGS = $ccflags $large
  40. URTLIB = $urtlib
  41. LDFLAGS = $libs $ldflags
  42. CC = $cc
  43. MKDEP = $mkdep
  44. YACC = $yacc
  45.  
  46. !GROK!THIS!
  47.  
  48. : In the following dollars and backticks do not need the extra backslash.
  49. $spitshell >>Makefile <<'!NO!SUBS!'
  50. LIBRAYDIR = ../libray
  51. LIBSHADEDIR = ../libshade
  52. INCLUDE = -I$(LIBRAYDIR) -I$(LIBSHADEDIR) -I..
  53. YFLAGS = -d
  54.  
  55. #
  56. # If using GL on an SGI machine, use:
  57. GRAPHICSLIBS = -lsphere -lgl_s
  58. SPHERELIB = -DSPHERELIB
  59.  
  60. #
  61. # If using GL on an RS6000, use:
  62. #GRAPHICSLIBS = -lgl
  63. #SPHERELIB=
  64.  
  65. LIBRAY = $(LIBRAYDIR)/libray.a
  66. LIBSHADE = $(LIBSHADEDIR)/libshade.a
  67.  
  68. CFLAGS = $(CCFLAGS) $(SPHERELIB) $(URTINC) $(INCLUDE) $(OPTIMIZE)
  69. SHELL = /bin/sh
  70.  
  71. #
  72. # If you have a fast malloc library, use it (e.g., -lmalloc on MIPS machines)
  73. #
  74. LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)
  75.  
  76. DRIVE_C =    main.c glmethods.c spheregen.c version.c
  77.  
  78. DRIVE_O = $(DRIVE_C:.c=.o)
  79.  
  80. CFILES = $(DRIVE_C)
  81.  
  82. SHFILES = Makefile.SH
  83.  
  84. OBJ = $(DRIVE_O)
  85.  
  86. DEPENDSRC = $(DRIVE_C)
  87.  
  88. #
  89. # Change $(CC) below to $(LCC) if using Linda.
  90. #
  91. rayview: $(OBJ) $(LIBS)
  92.     $(CC) $(OPTIMIZE) -o rayview $(OBJ) $(GRAPHICSLIBS) $(LIBS) $(LDFLAGS)
  93.  
  94. #
  95. # Uncomment the following rule if using Linda.
  96. #
  97. #raytrace.lo: raytrace.cl
  98. #    $(LCC) $(CFLAGS) -c raytrace.cl
  99.  
  100. #
  101. # End of configuration section
  102. #
  103. install:    rayview    
  104.         mv rayview $(BINDIR)/rayview
  105.  
  106. clean:
  107.     rm -f $(OBJ) core
  108.  
  109. realclean:
  110.     rm -f $(OBJ) core y.tab.h
  111.     rm -f *.orig Makefile
  112.  
  113. lint:
  114.     lint $(CFLAGS) -x $(CFILES) -lm
  115.  
  116. tags:
  117.     ctags -t $(CFILES)
  118.  
  119. depend:
  120.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  121.      $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
  122.     ) >Makefile.new
  123.     cp Makefile Makefile.bak
  124.     cp Makefile.new Makefile
  125.     rm -f Makefile.new
  126.  
  127.  
  128. # DO NOT DELETE THIS LINE
  129. !NO!SUBS!
  130. chmod 755 Makefile
  131. $eunicefix Makefile
  132.